$(function(){
	var barlist = $("#bar-list");
	var barItem = barlist.find("li");
	//搜索框
	var searchIn = $("#searchValue");
	searchIn.on("focus",function(){
		$(this).parent().find(".ss").addClass("active");
	})
	.on("blur",function(){
		$(this).parent().find(".ss").removeClass("active");
	})
	.on("keyup",function(e){
		if(e.keyCode == "13"){
			$(this).blur();
			$("#searchBtn").trigger("click")
		}
	});
	barlist.width(barItem.length*barItem.width() + 1);
	function lookOverflow(){
		if(barlist.width() > barlist.parent().width()){
			barlist.parent().css("overflow-x","scroll")
		}else{
			barlist.parent().css("overflow-x","visible")
		}
	}
	lookOverflow();
	window.onresize = function(){
		lookOverflow();
	}

})